Skip to content

[jsweep] Clean write_daily_aic_usage_cache.cjs#46706

Merged
pelikhan merged 1 commit into
mainfrom
signed/jsweep/write-daily-aic-usage-cache-bc5a456929fe79f2
Jul 20, 2026
Merged

[jsweep] Clean write_daily_aic_usage_cache.cjs#46706
pelikhan merged 1 commit into
mainfrom
signed/jsweep/write-daily-aic-usage-cache-bc5a456929fe79f2

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Removes the redundant CACHE_FILE_PATH alias and uses AIC_USAGE_CACHE_FILE_PATH directly, eliminating one level of indirection with no behavior change.

Changes

  • Removed const CACHE_FILE_PATH = AIC_USAGE_CACHE_FILE_PATH; alias constant (3 lines)
  • Updated mainWithPaths() to reference AIC_USAGE_CACHE_FILE_PATH directly

Context

  • File: actions/setup/js/write_daily_aic_usage_cache.cjs
  • Execution context: github-script (uses ambient core globals)
  • Tests: 11 existing tests — coverage is already comprehensive; no new tests needed

Validation ✅

All checks passed:

  • Formatting: npm run format:cjs
  • Linting: npm run lint:cjs
  • Type checking: npm run typecheck
  • Tests: npm run test:js

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • traces.example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "traces.example.com"

See Network Configuration for more information.

Generated by 🧹 jsweep - JavaScript Unbloater · 52 AIC · ⌖ 8.51 AIC · ⊞ 7.7K ·

  • expires on Jul 21, 2026, 9:03 PM UTC-08:00

Remove redundant CACHE_FILE_PATH alias; use AIC_USAGE_CACHE_FILE_PATH directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review July 20, 2026 05:13
Copilot AI review requested due to automatic review settings July 20, 2026 05:13
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Test Quality Sentinel completed test quality analysis.

No test files were added or modified in this PR. Test Quality Sentinel skipped.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

PR Code Quality Reviewer completed the code quality review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes a redundant cache-path alias without changing runtime behavior.

Changes:

  • Uses AIC_USAGE_CACHE_FILE_PATH directly in mainWithPaths().
Show a summary per file
File Description
actions/setup/js/write_daily_aic_usage_cache.cjs Simplifies default cache-path selection.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Medium

*/
async function mainWithPaths(cacheFilePath, usageDir) {
const cachePath = cacheFilePath || CACHE_FILE_PATH;
const cachePath = cacheFilePath || AIC_USAGE_CACHE_FILE_PATH;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Fix the code for all comments in this review comment.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review comment.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Design Decision Gate 🏗️ completed the design decision gate check.

No ADR enforcement needed: PR #46706 does not have the 'implementation' label and has 0 new lines of code in business logic directories (threshold: 100).

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean removal of a redundant alias. The behavior is identical and the direct reference to AIC_USAGE_CACHE_FILE_PATH is clearer. LGTM.

🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · 11 AIC · ⌖ 6.97 AIC · ⊞ 5K

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skills-Based Review 🧠

Applied /codebase-design — clean removal of a one-line alias with no behaviour change.

📋 Summary

Positive Highlights

  • ✅ Correct change: removing the CACHE_FILE_PATH alias reduces indirection without any risk
  • ✅ All CI checks pass per the PR description
  • ✅ No new tests needed — existing 11 tests cover the unchanged logic

One Open Point

The existing review comment (Copilot, line 48) flags a JSDoc @link that still references the now-removed CACHE_FILE_PATH symbol — worth addressing before merge.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · 13.3 AIC · ⌖ 4.37 AIC · ⊞ 6.7K
Comment /matt to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean alias removal. Referencing AIC_USAGE_CACHE_FILE_PATH directly is strictly better — one less name to track, zero behavior change.

🔎 Code quality review by PR Code Quality Reviewer · 9.5 AIC · ⌖ 4.3 AIC · ⊞ 5.6K
Comment /review to run again

@github-actions github-actions Bot mentioned this pull request Jul 20, 2026
@pelikhan
pelikhan merged commit 01710a0 into main Jul 20, 2026
44 of 45 checks passed
Copilot stopped work on behalf of pelikhan due to an error July 20, 2026 05:28
Copilot AI requested a review from pelikhan July 20, 2026 05:28
@github-actions

Copy link
Copy Markdown
Contributor Author

🎉 This pull request is included in a new release.

Release: v0.82.14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants